"""
@File    ：page_menu.py
@Author  ：ixiaodu
@Date    ：2024/8/15
@Desc    ：
"""
import allure
from common.page_base import Base
from page_element import el_menu
from utils.timer import sleep


class Menu(Base):
    """菜单类类"""

    def click_business_management(self):
        """点击业务管理"""
        self.base_click(el_menu.business_management)
        sleep()

    def click_maintenance_management(self):
        """点击维修管理"""
        self.base_click(el_menu.maintenance_management)
        sleep()

    def click_repair_config(self):
        """点击维修配置"""
        self.base_click(el_menu.repair_config)
        sleep()

    def click_repair_management(self):
        """点击报修管理"""
        self.base_click(el_menu.repair_management)
        sleep()

    def jump_repair_config(self):
        """跳转维修配置"""
        with allure.step("点击业务管理"):
            self.click_business_management()
        with allure.step("点击维修管理"):
            self.click_maintenance_management()
        with allure.step("点击维修配置"):
            self.click_repair_config()

    def jump_repair_management(self):
        """跳转报修管理"""
        with allure.step("点击业务管理"):
            self.click_business_management()
        with allure.step("点击维修管理"):
            self.click_maintenance_management()
        with allure.step("点击报修管理"):
            self.click_repair_management()